<template>
	<ulogin @handleLogin="tologin" :user_placeholderData="'请输入账号'" pwd_placeholderData="请输入密码"/>
</template>

<script setup>
	import ulogin from '/components/18login.vue'
	import http from '../components/http.js'
	function tologin(e){
		console.log(e)
		http.http({url:'/users/login',method:'POST',data:{name:e[0],password:e[1]}}).then(res=>{
			uni.setStorageSync('token',res.data.data)
			uni.navigateTo({
				url:'index'
			})
		})
	}
</script>

<style>
</style>